<%@ page import="com.webtest.shoppingcar1.Customer" %><%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 2018/8/7
  Time: 22:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Book Shop</title>
</head>
<body>
<h4>Step3:请确认图书购买的信息</h4>
<%
    Customer customer = (Customer) session.getAttribute("customer");
    String[] books = (String[]) session.getAttribute("books");
%>
<table border="1" cellpadding="10" cellspacing="0">

    <tr>
        <td>顾客姓名:</td>
        <td><%=customer.getName()%>
        </td>
    </tr>
    <tr>
        <td>地址:</td>
        <td><%=customer.getAddress()%>
        </td>
    </tr>
    <tr>
        <td>卡号:</td>
        <td><%=customer.getCardNo()%>
        </td>
    </tr>
    <tr>
        <td>信用卡类型:</td>
        <td><%=customer.getCardType()%>
        </td>
    </tr>
    <tr>
        <td>Books:</td>
        <td>
            <%
                if (null == books || books.length == 0) {
                    return;
                }
                for (String book : books) {
                    out.print(book);
                    out.print("<br/>");
                }
            %>
        </td>
    </tr>
</table>
</body>
</html>
